package br.com.ps.bombertournament.game.animation;

import br.com.ps.bombertournament.game.BaseGameObject;
import br.com.ps.bombertournament.game.WrapperMap;

/**
 * Provides the base interface that a action must do.
 * 
 * @author Rennan Stefan Boni - rennanboni@gmail.com
 */
public interface Action {
	
	/**
	 * Properties values to be used on execute and undo method
	 * 
	 * @param parameters New value of parameters
	 */
	public void setParameters(WrapperMap parameters);
	
	/**
	 * Indicate if the action is already executed
	 * 
	 * @return Return true if is already executed, otherwise return false
	 */
	public boolean isExecuted();
	
	/**
	 * Called when is necessary to reset the action before execute
	 */
	public void reset();
	
	/**
	 * Called when the action is created.
	 */
	public void create();

	/**
	 * Execute the action 
	 * 
	 * @param owner Owner of action.
	 */
	public void execute(BaseGameObject owner);
	
	/**
	 * Undone what was acted
	 * 
	 * @param owner Owner of action.
	 */
	public void undo(BaseGameObject owner);
}
